#ifndef _MYSQL_H
#define _MYSQL_H

#include <mysql/mysql.h>
#include <list>
#include <string>

#include "packdef.h"

using namespace std;

class CMysql
{
public:
    int ConnectMysql(const char* server, const char* user, const char* password, const char* database);
    int SelectMysql(const char* szSql, const int nColumn, std::list<string>& lst);
    int UpdataMysql(const char* szsql);
    void DisConnect();
private:
    MYSQL *conn;
    MYSQL_RES *results;
    MYSQL_ROW record;
};

#endif